﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Greve;
namespace Greve
{
    public class Cup
    {
        public String name;
        public String club;
        private bool running;
        public List<SubCup> subCup;
        public List<Judge> judges;
        public int maxJudges;
        public int judgeCount;


        public Cup()
        {
            judgeCount = 0;
            setJudges(3);
            subCup = new List<SubCup>();
        }
			
        public void startCup()
        {
            running = true;
        }
        
        public void addSubCup(SubCup s)
        {
            subCup.Add(s);
        }

        public void removeSubCup(SubCup s)
        {
            subCup.Remove(s);
        }
        public void setJudges(int numberofJudges)
        {
            maxJudges = numberofJudges;
            judges = new List<Judge>();
        }
        public void addJudge()
        {
            if (judgeCount != maxJudges)
            {
                judges.Add(new Judge());
                judgeCount++;
            }
        }
        public void addJudge(Judge J)
        {
            if (judgeCount != maxJudges)
            {
                judges.Add(J);
                judgeCount++;
            }
        }

        public int getMaxJudges()
        {
            return maxJudges;
        }
    }
}